# 设置项目名称为 FFmpegTest
project(PushStream)	
cmake_minimum_required(VERSION 3.10)

# 设置编译器选项
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -s -O3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -g -s -O3")

# 指定 FFmpeg 的头文件目录
include_directories(/usr/local/include)

set(FFMPEG_LIBRARIES 
    /usr/local/lib/libavdevice.so
    /usr/local/lib/libavcodec.so
    /usr/local/lib/libavformat.so
    /usr/local/lib/libavutil.so
    /usr/local/lib/libswscale.so
)

# 添加源文件
add_executable(push push.c)

# 链接FFmpeg库
target_link_libraries(push ${FFMPEG_LIBRARIES})






